# (n++ tab space: 4)
# ---------------------------------------------------------------------
# Clearlooks Gimp 2.10.1x Hinted Themes v1.1
# Variant: Small (Blue Hints)
# Author: migf1 (2020)
#
# The file contain lots of comments, hopefully making it a little easier to mess around with it.
# That said, I'm not a gtkrc guru (quite the contrary). Chances are that things could have
# been done much better, and/or that some of those comments may be wrong. 
#
# If you are using Gimp 2.8, try the following themes instead:
# https://www.deviantart.com/migf1/art/Clearlooks-Flat-Icons-Gimp-2-8-Themes-v-1-0-1-484289796
#
# ---------------------------------------------------------------------
# LICENSE:
#
# This theme is Licensed under GNU GPL 2 or later, with an additional Attribution term!
 #
# Meaning that additionally to all GNU GPL terms, any derivative work must be explicitly
# identified as such, followed by an easily accessible link to my DeviantArt account:
# https://www.deviantart.com/migf1
# ---------------------------------------------------------------------
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this product. If not, see <http://www.gnu.org/licenses/>.
#

/* ---------------------
 * Theme starts here
 * ---------------------
 */

# *************************
# GENERIC FONT
# *************************
# Some widgets (like the Lock Fixed Aspect Ratio|Size in the properties of the Select Rect/Ellipse tool) do not use "font_name", as defined in the "defualt" style.
# To fix their font, use this setting.
# (see also DEFAULT FONT, below)
###################

gtk-font-name = "Sans 8"				# was "Sans 11"	# font & size for missing styles (the rest use font_name, defined in the "default" style, below)

# *************************
# HIGHLIGHT COLOR
# *************************
# To change the current highlight color, uncomment one of the other lines
# or replace the hex color-code in the 1st line with any color-code you want.
# 
# You can also use X11 color names, WITHOUT prefixing them with the sharp sign
#
# For example:
# 		X11 name: gtk_color_scheme = "hl_color:Teal"
#		HEX code: gtk_color_scheme = "hl_color:#008080"
#
# X11 color names are listed here: https://en.wikipedia.org/wiki/X11_color_names
#
###################

gtk_color_scheme = "hl_color:#3380B3"		# Current Highlight Color
#gtk_color_scheme = "hl_color:#3380B3"		# blue
#gtk_color_scheme = "hl_color:#DC4D12"		# orange
#gtk_color_scheme = "hl_color:#BE006B"		# pink
#gtk_color_scheme = "hl_color:#B02222"		# red
#gtk_color_scheme = "hl_color:#008080"		# teal


##################
# OTHER SYMBOLIC COLORS
##################

## gtk_color_scheme has been depreciated since GTK 3.8
gtk_color_scheme = "fg_normal: #cccccc\nfg_disabled: #636363\nfg_hover: #FFFFFF"
gtk_color_scheme = "bg_normal: #3C3C3C\nbg_disabled: #515151\nbg_hover: #202020"

##################
# OTHER TOP LEVEL SETTINGS
##################

gtk-menu-popup-delay = 1							# Makes menus pop up faster! Set to 1 instead of 0 to avoid Banshee 1 bug.

gtk-menu-images = 0									# set to 1 if you want icons in front of menu entries
gtk-button-images = 0									# set to 1 if you want icons in front of button labels
gtk-auto-mnemonics = 1								# deprecated since GTK 3.10
#gtk-primary-button-warps-slider = 1			# set to 1 if the slider should move to the point you clicked inside the GtkRange trough (0 moves the slider by a "page" distance)
gtk-toolbar-style = GTK_TOOLBAR_ICONS	# Whether default toolbars have text only, text and icons, icons only, etc (deprecated since GTK 3.10)
gtk-application-prefer-dark-theme = 1			# GTK3 ONLY

##################
# STYLES
##################

style "default"
{
  # *************************
  # DEFAULT FONT
  # *************************
  # Set font_name to a different family and/or size, if text appears too small, or too large on your monitor
  # (see also GENERIC FONT, above)
  ##################

  font_name = "Sans 9"								# Uncomment this line and set a different font for GIMP.

  xthickness = 1
  ythickness = 1

  # Default Style Properties -----------------------------------

  GimpDockbook::tab-border  = 4					# tabs' inner spacing from border (or border's width ? ) (def: 0)
  GimpDock::font-scale = 0.85						# was 0.8333	# migf1: text of dockable panels/windows
  GimpRuler::font-scale = 0.6444	# = 0.8

  GtkButton::child-displacement-x = 0			# was 1
  GtkButton::child-displacement-y = 0			# was 1
  GtkButton::default-border = {0, 0, 0, 0}
  GtkButton::default-outside-border = {0, 0, 0, 0}		# +migf1
  GtkButton::inner-border = {0, 0, 0, 0}			# +migf1
  GtkButton::focus-line_width = 0					# +migf1
  GtkButton::focus-padding = 0					# +migf1

  # see also GtkCheckMenuItem::indicator-size below
  GtkCheckButton::indicator-size = 16			# check/radio mark (was: 14, def: 13)
  #GtkRadioButton ::indicator-size = 13			# inherits GtkCheckButton::indicator-size

 /* THESE CAUSE ISSUES
  GimpUnitComboBox::appears-as-list = 1 	# set to 1 if you want dropdowns to look like lists rather than menus
  GtkComboBoxEntry::appears-as-list = 1		# GtkComboBoxEntry is deprecated in GTK3
  GtkComboBoxText::appears-as-list = 1		# same as in GtkComboBox
  GtkComboBox::appears-as-list = 1				# set to 1 if you want dropdowns to look like lists rather than menus
*/

  GtkExpander::expander-size = 16				# expander arrow (def: 10)

  # this will be summed with the ythickness of a custom defined GtkMenuItem style
  GtkMenuBar::internal-padding = 4				# menubar height (def: 1)

  # these may also be extended via x/ythickness, in a custom defined GtkMenu style
  GtkMenu::horizontal-padding = 0				# left/right
  GtkMenu::vertical-padding = 0					# top/bottom

  GtkCheckMenuItem::indicator-size = 16		# check/radio mark
  GtkMenuItem::horizontal-padding = 8		# left/right (affects menubar items too) (def: 3)
  GtkMenuItem::arrow-scaling = 0.6				# submenu arrow, relative to menu item's font size

  GtkNotebook::arrow-spacing = 6				# tabs' scroll-arrows from left/right of tabs

  GtkPaned::handle-size = 7							# padding between panels, drag handle size (was: 8, def: 5)

  GtkRange::trough-border = 0						# spacing between thumb/steppers & outer trough bevel
  GtkRange::slider-width = 15						# width of scrollbar or scale thumb
  GtkRange::stepper-size = 15						# length of step buttons at ends

  GtkScale::slider-length = 18						# slider width/height
  GtkScale::trough-side-details = 1

  GtkScrollbar::min_slider_length = 30
  GtkScrollbar::slider-width = 18					# scrollbar width (was: 15, def: ?)
  GtkScrollbar::activate-slider = 0					# set to 1 if you want sliders to be drawn ACTIVE and with shadow IN while they are dragged
																	# doesn't seem to do anything with the clearlooks engine

  GtkScrolledWindow::scrollbar-spacing = 1
  GtkScrolledWindow::scrollbars-within-bevel = 1

  GtkTreeView::expander-size = 14				# tree-expander arrow (see Preferences dialog)
  GtkTreeView::horizontal-separator = 6		# horz spacing between items (must be even number) (def: 2)
  GtkTreeView::vertical-separator = 6			# vert spacing between items (must be even number) (def: 2)

  GtkWidget::link-color = shade(1.5, @hl_color)								# unvisited links 
  GtkWidget::visited-link-color = mix(0.6, @fg_normal, @hl_color)		# visited links 

  # Default Color Definitions ----------------------------------

  ## Text on buttons (also button borders in some engines)
  fg[NORMAL] = @fg_normal
  fg[PRELIGHT] = @fg_hover
  fg[SELECTED] = @fg_hover
  fg[ACTIVE] = @fg_normal
  fg[INSENSITIVE] = @fg_disabled

  ## Background color of windows and buttons
  bg[NORMAL] = @bg_normal
  bg[PRELIGHT] = @bg_hover
  bg[SELECTED] = @hl_color
  bg[ACTIVE] = @bg_hover
  bg[INSENSITIVE]   = @bg_disabled

  ## Text color for text input widgets and lists (/GtkTreeView)
  text[NORMAL] = @fg_normal
  text[PRELIGHT] = @fg_hover
  text[SELECTED] = @fg_hover
  text[ACTIVE] = @fg_hover
  text[INSENSITIVE] = @fg_disabled

  ## Background color of text widgets and lists (/GtkTreeView)
  base[NORMAL] = @bg_disabled
  base[PRELIGHT] = @bg_normal
  base[SELECTED] = @hl_color
  base[ACTIVE] = @hl_color
  base[INSENSITIVE] = @bg_normal

  # Default Engine Settings ------------------------------------
  engine "clearlooks" 
  {
     #contrast = 1.3					#
     radius = 0.0							# Roundness of widgets # 0.0 fixes half-drawn lock-icons
     #scrollbar_color   = "#00ff00"
     #colorize_scrollbar = TRUE		#
     #reliefstyle = 1						# 0 makes buttons/widgets less raised.
     menubarstyle = 0				# 0 = flat, 1 = sunken, 2 = flat gradient
												# (gradient menubar, use tweak in line 66 for flat menubars)
     menuitemstyle = 0				# 0 = flat, 1 = 3d-ish (gradient), 2 = 3d-ish (button)
     toolbarstyle = 0					# 0 makes bad toolbars flat.
     #animation = TRUE				# FALSE disables progressbar animations.
     #progressbarstyle = 0			# 0 = candy bar, 1 = flat
     #listviewitemstyle = 1			# 0 = flat, 1 = 3d-ish (gradient)
     #style = CLASSIC					# style between CLASSIC, GLOSSY, INVERTED and GUMMY
     #hint = "use-hints"				# Set a hint to disable backward compatibility fallbacks.
  }
}

style "menu"
{
  bg[NORMAL] = @bg_hover	# Menus background

  #engine "clearlooks" { }
}

style "menu-item"
{
  xthickness = 4									# adds to: GtkMenuItem::horizontal-padding
  ythickness  = 4 									# adds to: GtkMenuItem::vertical-padding (see also: GtkMenuBar::internal-padding)

  #fg[NORMAL] = @fg_normal				# Normal color for Text, Submenu Arrows & Icon Borders (but does NOT affect at all Check/Radio Indicators)
  #fg[PRELIGHT] = @fg_hover				# Mouse-over color for Text, Submenu Arrows & Icon Borders (but does NOT affect at all Check/Radio Indicators)
  #fg[ACTIVE] = "red"							# ?
  #fg[SELECTED] = "red"						# ?
  fg[INSENSITIVE] = @fg_disabled 		# Color  for inactive Submenu Arrow & Icon Border (but does NOT affect Check/Radio Indicators)

  bg[NORMAL] = shade(0.9, @fg_disabled)	# Text color for menu Separator Lines AND Check/Radio Indicator box Borders
  #bg[PRELIGHT] = "red"								# ?
  #bg[ACTIVE] = "red"									# ?
  bg[SELECTED] = shade(0.9, @hl_color)		# Mouse-over Bg color (does NOT affectt Check/Radio Indicators)
  #bg[INSENSITIVE] = "red"							#?

  base[NORMAL] = shade(1.3, @bg_normal)	# Bg color for Check/Radio Indicator boxes (not the Borders, not the Check/Radio char)
  #base[PRELIGHT] = "red"							# ?
  #base[ACTIVE] = "red"								# ?
  #base[SELECTED] = "red"							# ?
  #base[INSENSITIVE] = "red"						# ?

  #text[NORMAL] = shade(1.5, @hl_color)		# Normal color for Indicator char when item is enabled (HAS SIDE EFFECTS, I MOVED IT TO style "check-menu-item")
  #text[PRELIGHT] = "red"								# ?
  #text[ACTIVE] = "red"									# ?
  #text[SELECTED] = "red"								# ?
  #text[INSENSITIVE] = "red"							# ?

  #engine "clearlooks" { }
}

style "check-menu-item" = "menu-item"
{
  bg[NORMAL] = @bg_hover						# Normal bg color for Indicator box Border
  base[NORMAL] = @bg_hover						# Bg color for Check/Radio Indicator boxes (not the Borders, not the Check/Radio char)
  text[NORMAL] = shade(1.5, @hl_color)		# Normal color for Indicator char when item is enabled

  #engine "clearlooks" { }
}

style "menu-bar"
{
  bg[NORMAL] = @bg_normal #@bg_hover	# MenuBar background
  bg[SELECTED] = @hl_color				# Mouse-over bg color

  #engine "clearlooks" { }
}

style "tearoff-menu-item"
{
  bg[NORMAL] = shade(0.8, @hl_color)
  bg[SELECTED] = @bg_normal #@bg_disabled

  #engine "clearlooks" { }
}

/*
# This needs to be tested, especially the bindings with the double ## below
# The bindings should precede the notebook binding, without using style:highest 
style "notebook_bg" {

	bg[NORMAL]  = "green"
}
##widget_class "*<GtkNotebook>*<GtkEventBox>" style:highest "notebook_bg"
#widget_class "*<GtkNotebook>*<GtkDrawingArea>" style:highest "notebook_bg"
#widget_class "*<GtkNotebook>*<GtkLayout>" style:highest "notebook_bg"
##widget_class "*<GtkNotebook>*<GtkViewport>" style:highest "notebook_bg"
##widget_class "*<GtkNotebook>*<GtkScrolledWindow>" style:highest "notebook_bg"
*/

style "notebook"
{
   # These, if used here, they SHOULD be overwritten for combo-boxes & other elements.
   # Also, regarding their effect in tabs' size, they add to the value of GimpDockbook::tab-border
   xthickness = 4      											# tab width  (among other things) adds to: GimpDockbook::tab-border
   ythickness = 4      											# tab height (among other things) adds to: GimpDockbook::tab-border

   #fg[NORMAL] = @hl_color								# Border color of last activated Tab
   fg[ACTIVE] = @hl_color									# Inactive tab text, Panel selected item

   bg[NORMAL] = @bg_normal							# Active tab background color (INCLUDING the whole pane)
   bg[ACTIVE] = shade(0.825, @bg_normal)		# Inactive tab background color
   bg[SELECTED] = @hl_color							# Hint-color at the top of the active tab (the thin stripe)

   text[ACTIVE] = @fg_normal							#?

   base[ACTIVE] = shade(0.9, @hl_color)			# ?
   base[SELECTED] = @hl_color							# ?

  #engine "clearlooks" { }
}

style "button"
{
  xthickness = 3
  ythickness  = 3

  fg[NORMAL] = lighter(@hl_color)
  fg[ACTIVE] = @fg_hover
  fg[PRELIGHT] = @fg_hover

  bg[NORMAL] = shade(1.5, @bg_normal)						# Normal bg color for buttons
  bg[PRELIGHT] = @hl_color	#shade(0.8, @bg_normal)		# Mouse-over bg color for buttons
  bg[ACTIVE] = @hl_color #@bg_hover								# Mouse-depressed bg color for buttons
  bg[INSENSITIVE] = @bg_disabled									# Bg color of inactive buttons (e.g. the layers Blend mode list, when no image is opened

  #engine "clearlooks" { }
}

style "toggle-button"
{
  fg[ACTIVE] = @fg_normal
  #bg[NORMAL] = @hl_color
  bg[PRELIGHT] = @hl_color # @bg_normal

  #engine "clearlooks" { }
}

style "toggle-button-label" = "toggle-button"
{
  fg[ACTIVE] = shade(1.5, @hl_color)		# Text color of enabled check/radio bauttons

  #engine "clearlooks" { }
}

style "toolbox-toggle-button" #= "button"
{

  ## IMPORTANT:
  ## if the horizontal spacing for each tool is too small and the tools are set to small icons,
  ## then even when the toolpalette is narrowed all the way, teh best we get is 2 columns of icons (instead of 1)
  GtkButton::focus-padding = 4
  #GtkButton::inner-border = { 6, 6, 6, 6 }		# (alternative to GtkButton::focus-padding) on the ToolPalette each tool leaves a 6+6 pixels space from its adjacent tools

  bg[NORMAL] = lighter(@hl_color)  								# tool's border (lighter when hovered, darkened otherwise)
  bg[PRELIGHT] = shade(0.65, @hl_color)	# @bg_hover	# background fill on hover
  bg[ACTIVE] = @hl_color
  bg[SELECTED] = @hl_color
  bg[INSENSITIVE] = @bg_disabled

  #engine "clearlooks" { }
}

style "colornotebook-hsvrgb-buttons" = "toggle-button"
{
  GtkButton::inner-border = {5,5,3,3}	# was: {8,8,1,1}

  fg[NORMAL] = @fg_normal
  bg[PRELIGHT] = @hl_color # @bg_hover

  #engine "clearlooks" { }
}

style "entry"
{
  xthickness = 3
  ythickness = 3

  fg[PRELIGHT] = @hl_color						# When inherited by the spin-button style, it sets the Mouse-over Bg color of the spinner-buttons
  fg[ACTIVE] = @hl_color							# When inherited by the spin-button style, it sets the Mouse-depressed Bg color of the spinner-buttons
  text[ACTIVE] = shade(0.8, @hl_color) 	# Fg of selected text when widget is out of focus
  base[ACTIVE] = shade(1.3, @hl_color) 	# Bg of selected text when widget is out of focus

  #engine "clearlooks" { }
}

style "spin-button" = "entry"
{
  xthickness = 5
  ythickness = 5

  #engine "clearlooks" { }
}

style "combo-box"
{
  #GtkComboBox::popup-fixed-width = 0
  GtkComboBox::shadow-type = GTK_SHADOW_NONE		# this makes it look the same with the spin-buttons

  xthickness = 1    								# inner horz-spacing from border (overwrites notebook's inherited value)
  ythickness = 1    								# inner vert-spacing from border (overwrites notebook's inherited value)

  fg[PRELIGHT] = @fg_hover
  fg[ACTIVE] = @fg_normal

  bg[NORMAL] = @bg_normal #shade(1.2, @bg_normal)		# bg of arrow's box & fg of widget's outer border 
  bg[PRELIGHT] = @hl_color					# Mouse-over Bg color for arrow-button only
  bg[ACTIVE] = @hl_color						# Mouse-depressed Bg color for arrow-button only
  #bg[SELECTED] = "red"						# Border color of text-only, when in focus
  #bg[INSENSITIVE] = "red"					# Bg color of inactive arrow-button only


  #engine "clearlooks" { }
}

# Scrollbar (to be used if engine's colorize_scrollbar is FALSE)
# =========================================================
style "scrollbar"
{
  fg[NORMAL] = @fg_normal				# Normal text color of arrows
  fg[PRELIGHT] = @fg_hover					# Mouse-over text color of arrows
  fg[ACTIVE] = @fg_normal					# Mouse-depressed text color of arrows
  fg[INSENSITIVE] = @fg_disabled			# Text color of inactive arrows

  bg[NORMAL] = @bg_disabled			# Normal bg color of trough & arrows (thumbs auto-gets a little lighter)
  bg[PRELIGHT] = @hl_color					# Mouse-over bg color of thumb & arrows
  bg[ACTIVE] = @hl_color						# Mouse-depressed bg color of thumb & arrows
  bg[INSENSITIVE] = @bg_disabled		# Bg color of inactive scroll-arrows

  #engine "clearlooks" { }
}

## UNUSED ##
# Scrollbar (forcing engine's "colorize_scrollbar" to TRUE)
# =========================================================
/*
style "scrollbar-with-engine-colorize"
{
# Without using hints
  fg[NORMAL] = @fg_normal
  fg[PRELIGHT] = @fg_hover
  fg[ACTIVE] = @fg_normal

  bg[NORMAL] = shade(1.25, @bg_normal)			# Normal bg of trough and arrows
  bg[PRELIGHT] = @hl_color
  bg[ACTIVE] = @hl_color
  bg[SELECTED] = shade(1.0, @bg_disabled)			# Bg of thumb
  bg[INSENSITIVE] = shade(1.25, @bg_normal)		# Bg color of inactive scroll-arrows

  engine "clearlooks"  {
     colorize_scrollbar = TRUE
     #style = GUMMY
  }
}
*/

style "statusbar"
{
  #ythickness = 2  # (overwrites notebook's ythickness)

  #engine "clearlooks" { }
}

style "ruler"
{
  fg[NORMAL] = shade(0.8, @fg_normal)

  #engine "clearlooks" { }
}

## Hide "you can drop dockable dialogs here"
style "drop-here-label"
{
  fg[NORMAL] = @bg_normal

  #engine "clearlooks" { }
}

style "empty-canvas"
{
  bg[NORMAL] = shade(0.8, @bg_normal)  		# canvas padding
  fg[NORMAL] = shade(1.5, @bg_normal)  		# Wilber

  #engine "clearlooks" { }
}

style "tooltips"
{
  xthickness = 8
  ythickness = 8

  fg[NORMAL] = "#ddd"
  bg[NORMAL] = shade(0.7, @hl_color)

  #engine "clearlooks" { }
}

###########################################################
# WIDGET-CLASS MATCHES  -- (ORDER MATTERS)
###########################################################

widget_class "<GtkWidget>*" style "default"

widget_class "*<GtkMenu>" style "menu"
widget_class "*<GtkMenuItem>*" style "menu-item"
widget_class "*<GtkMenuBar>*" style "menu-bar"
widget_class "*<GtkTearoffMenuItem>" style "tearoff-menu-item"
widget_class "*<GtkCheckMenuItem>" style "check-menu-item"

widget_class "*<GtkNotebook>" style "notebook"					# was: widget_class "*<GtkNotebook>*"

widget_class "*<GtkButton>" style "button"
widget_class "*<GtkToggleButton>" style "toggle-button"	# was: widget_class "*<GtkToggleButton>*"
widget_class "*<GtkToggleButton>*<GtkLabel>" style "toggle-button-label"
widget_class "*<GimpToolbox>*<GtkToggleButton>" style "toolbox-toggle-button"
widget_class "*<GimpColorNotebook>*<GtkRadioButton>" style "colornotebook-hsvrgb-buttons"
widget_class "*<GtkEntry>" style "entry"
widget_class "*<GtkSpinButton>" style "spin-button"
widget_class "*ComboBox*" style "combo-box"

widget_class "*<GtkScrollbar>*" style "scrollbar"
#widget_class "*<GtkScrollbar>*" style "scrollbar-with-engine-colorize"
widget_class "*<GtkStatusbar>*" style "statusbar"
widget_class "*<GimpRuler>" style "ruler"

widget_class "*<GimpPanedBox>.<GtkLabel>" style "drop-here-label"
widget_class "*Canv*" style "empty-canvas"

###########################################################
# WIDGET-NAME MATCHES
###########################################################

widget "gtk-tooltip*" style "tooltips"

/* -------------------------------------------------------------
 * New styles or styles to be overwritten go here
 * -------------------------------------------------------------
 */
